package com.vrp3d.service.impl;

import com.vrp3d.common.enums.CommonEnum;
import com.vrp3d.common.utils.FileUtil;
import com.vrp3d.service.FileService;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件
 *
 * @author vrp3d
 */
@Service
public class FileServiceImpl extends AbsServiceImpl implements FileService {

    @Override
    public String uploadKeepTheFileName(MultipartFile file) {
        String targetFolder = CommonEnum.FOLDER_TEMP.getMsg();
        targetFolder += getFileStoragePath();
        return FileUtil.uploadFile(file, targetFolder);
    }
}
